package com.example.android.shanwei

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.Toast

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val button=findViewById<Button>(R.id.btn_index)
        button.setOnClickListener {
            Toast.makeText(this, "欢迎来到汕尾！", Toast.LENGTH_SHORT).show()
            val intent= Intent(this,ListActivity::class.java)
            startActivity(intent)
        }
    }
}